package cc.catface.account;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.Map;

@RestController
public class AccountController {

    @Value("${server.port}")
    private String port;

    @GetMapping("account")
    public String account(@RequestHeader Map<String, String> headers) {
        return "account--" + new Date().toLocaleString() + ", port:" + port + ", headers:" + headers.toString();
    }
}
